﻿using DevTeam;
using System.Data;

namespace ConfExpert.Forms.Rapor
{
    public partial class xrKesilenAdetSticker : DevExpress.XtraReports.UI.XtraReport
    {
        DataSet dsFoy;
        public xrKesilenAdetSticker(int PlanlamaId)
        {
            InitializeComponent();
            dsFoy = Session.DataManager.ExecuteDataSet("GetKesilenAdetStickerFoy", PlanlamaId);

            BindDstoReport();
        }

        private void BindDstoReport()
        {
            this.DataMember = "Table";
            this.DataSource = dsFoy;

            tcArtikel.DataBindings.Add("Text", null, "Table.Artikel");
            tcBeden.DataBindings.Add("Text", null, "Table.Beden");
            tcDosyaNo.DataBindings.Add("Text", null, "Table.DosyaNo");
            tcKesilenAdet.DataBindings.Add("Text", null, "Table.KesilenAdet");

        }

        private void tbSticker_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            bool IsLineVisible = GetCurrentColumnValue("Nr").ToInt() == 1;
            xrLine1.Visible = IsLineVisible;
        }
    }
}
